# Create your views here.
# -*- coding: utf-8 -*-

from .models import WikiUser
from .models import Page

from core.views import BaseView

__author__ = 'Liantian'


class Index(BaseView):
    def get(self,request):
        return self.response(template_file="Wiki/Index.html")


class ViewPage(BaseView):
    def get(self,request,page_id):
        archive = Page.objects.get(id=page_id).get_latest_archive()
        self.response_dict['archive'] = archive
        return self.response(template_file="Wiki/ViewPage.html")

